<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>检查任务管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
		function addRow(list, idx, tpl, row){
			$(list).append(Mustache.render(tpl, {
				idx: idx, delBtn: true, row: row
			}));
			$(list+idx).find("select").each(function(){
				$(this).val($(this).attr("data-value"));
			});
			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
				var ss = $(this).attr("data-value").split(',');
				for (var i=0; i<ss.length; i++){
					if($(this).val() == ss[i]){
						$(this).attr("checked","checked");
					}
				}
			});
		}
		function delRow(obj, prefix){
			var id = $(prefix+"_id");
			var delFlag = $(prefix+"_delFlag");
			if (id.val() == ""){
				$(obj).parent().parent().remove();
			}else if(delFlag.val() == "0"){
				delFlag.val("1");
				$(obj).html("&divide;").attr("title", "撤销删除");
				$(obj).parent().parent().addClass("error");
			}else if(delFlag.val() == "1"){
				delFlag.val("0");
				$(obj).html("&times;").attr("title", "删除");
				$(obj).parent().parent().removeClass("error");
			}
		}
		function dosubmit_(){ 
			$("#inputForm").attr("action", "${ctx}/jcxx/drJcxx/toK");
			$("#inputForm").submit();
		}
		function doSave(){ 
			$("#inputForm").attr("action", "${ctx}/jcxx/drJcxx/list_jh");
			$("#inputForm").submit();
		}		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/jcxx/drJcxx/form?id=${drJcxx.id}">检查计划查看</a></li>
	</ul><br/>
    <form:form id="inputForm" modelAttribute="drJcxx" action="${ctx}/jcxx/drJcxx/took" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">法定事项：</label>
			<div class="controls">
				<form:input path="fdsx" htmlEscape="false" maxlength="10" class="input-xlarge" value="天津局-管理体系和服务认证专项监督检查" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">计划名称：</label>
			<div class="controls">
            	
				<form:input path="jhmc" htmlEscape="false" maxlength="255" class="input-xlarge " value="天津局-管理体系和服务认证专项监督检查计划" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">制定单位：</label>
			<div class="controls">
				<form:input path="office.id" htmlEscape="false" maxlength="64" class="input-xlarge " value="天津局" disabled="true"/>
                <span class="help-inline"> 执法人员库人数：20人，执法对象库数量：30个</span>
			</div>
            
		</div>
		<div class="control-group">
			<label class="control-label">计划管理单位：</label>
			<div class="controls">
				<form:input path="office.id" htmlEscape="false" maxlength="64" class="input-xlarge " value="天津局" disabled="true"/>
			</div>
		</div>        
		<div class="control-group">
			<label class="control-label">执法小组数量：</label>
			<div class="controls">
				<form:input path="jhxzsl" htmlEscape="false" maxlength="10" class="input-xlarge  digits" value="2" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">每组人数：</label>
			<div class="controls">
				<form:input path="xzrs" htmlEscape="false" maxlength="10" class="input-xlarge  digits" value="3" disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">执法对象数目：</label>
			<div class="controls">
				<span><input id="wtsl1" name="wtsl" type="radio" checked value="百分比"/><label for="wtsl1">百分比</label></span><span><input id="wtsl2" name="wtsl" type="radio" value="数量"/><label for="wtsl2">数量</label></span></br>
				<input id="dxsl" name="dxsl" class="input-xlarge  digits" type="text" value="20" maxlength="10" disabled="true"/>
			</div>

		</div>
<!--		<div class="control-group">
			<label class="control-label">抽取对象分组数量：</label>
			<div class="controls">
				<form:input path="dxfz" htmlEscape="false" maxlength="10" class="input-xlarge  digits"/>
			</div>
		</div>-->
		<div class="control-group">
			<label class="control-label">备注信息：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<input id="btnCancel" class="btn" type="button" value="返 回" onClick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>